package com.care.doctor.remote;

import com.care.common.core.domain.Result;
import com.care.doctor.common.domain.DTODepartment;
import com.care.doctor.common.req.ListReq;
import com.care.doctor.remote.factory.RemoteDepartmentFallbackFactory;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "DepartmentRemoteService",value = "care-doctor",fallbackFactory = RemoteDepartmentFallbackFactory.class)
public interface DepartmentRemoteService {

    @PostMapping("/department/findDepartment")
    public Result<PageInfo<DTODepartment>> findDepartment(@RequestBody ListReq req);
    @GetMapping("/listAll")
    public Result listAll();
}
